<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\Route;

class Config extends BaseModel
{
    protected $table = 'configs';

    protected $fillable = [
        'store_id',
        'name',
        'value',
        'describe',
    ];
    
//    public function getValueAttribute($value)
//    {
//    	if(Route::currentRouteName() == 'refund-config.edit') {
//    	    return array_values(json_decode($value, true) ?: []);
//	    } else {
//    		return $value;
//	    }
//    }
//
//    public function setValueAttribute($value)
//    {
//    	if(Route::currentRouteName() == 'refund-config.update') {
//    	    $this->attributes['value'] = json_encode(array_values($value));
//	    }
//    }
}
